import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int start = scanner.nextInt();
        int end = scanner.nextInt();
        method(start,end);
    }
    public static boolean isPrime(int end){
        for(int j = 2; j * j <= end; j++){
            if(end % j == 0)
                return false;
        }
        return true;
    }
    public static void method(int start,int end){
        int count=0;
        if(start > end){
            int t = start;
            start = end;
            end = t;
        }
        for(int i = start; i <= end; i++){
            if(i <= 2)
                continue;
            if(isPrime(i)){
                count++;
            }
        }
        System.out.println(start+"到"+end+"之间有"+count+"个大于2的素数"); //输出
    }
}
